/**
 * Project Name:dvcms
 * File Name:AdminUser.java
 * Package Name:com.dv.model
 * Date:2014年8月28日下午5:41:10
 * Copyright (c) 2014, lsflu@126.com All Rights Reserved.
 */
package com.fast.user.model.admin;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.fast.base.db.model.Commnent;
import com.fast.base.model.BaseModel;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * ClassName:AdminUser <br/>
 * 用途: 管理人员 <br/>
 * 开发人员：lushuifa http://lushuifa.iteye.com/ 邮箱:lsflu@126.com
 * 
 * @version
 * @since JDK 1.6
 * @see Date: 2014年8月28日 下午5:41:10 <br/>
 */
@Entity
@Table(name = "t_dv_adminUser")
@DynamicInsert(true)
@DynamicUpdate(true)
public class AdminUser implements java.io.Serializable {

	/**
	 * serialVersionUID:提示:.
	 * 
	 * @since JDK 1.7
	 */
	private static final long serialVersionUID = -9001502613060502159L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false, length = 10)
	@Commnent("编号")
	private int id;
	@Commnent("UUID")
	@Column(length = 32)
	private String uuid = "";// 唯一ID

	@Commnent("用户名")
	@Column(name = "userName", length = 32)
	private String userName = "";// 用户名
	@Commnent("密码")
	@Column(length = 64)
	private String password = "";// 密码
	@Commnent("姓名")
	@Column(length = 64)
	private String realName = "";
	@Commnent("证件类型")
	@Column(name = "card_type", length = 64)
	private String cardType = "";
	@Commnent("证件号码")
	@Column(name = "card_No", length = 64)
	private String cardNo = "";
	@Commnent("性别")
	@Column(name = "sex", length = 1)
	private int sex = 0;// 性别
	@Commnent("生日")
	@Temporal(TemporalType.DATE)
	private Date birthday;// 生日
	@Commnent("头像")
	@Column(name = "head_pic", length = 1000)
	private String headPic = "";
	@Commnent("备注")
	@Column(name = "remark", length = 1000)
	private String remark = "";

	// 单位机构从属
	@Commnent("所属单位ID")
	@Column(name = "company_uuid")
	private String companyUUID = "";// 所属单位ID
	@Commnent("单位名称")
	@Column(name = "company_name", length = 128)
	private String companyName = "";// 所属单位名称
	@Commnent("部门ID")
	@Column(name = "dept_uuid")
	private String deptUUID = "";// 所属部门名称
	@Commnent("部门名称")
	@Column(name = "dept_name", length = 128)
	private String deptName = "";// 所属部门名称

	@Commnent("职务岗位")
	@Column(name = "position_uuid")
	private String positionUUID = "";// 职位ID

	@Commnent("职务岗位")
	@Column(name = "position_Name", length = 128)
	private String positionName = "";// 所属职务岗位

	// 联系方式
	private String homeTel = "";// 家里电话
	private String workTel = "";// 工作电话
	private String mobileTel = "";// 移动电话，手机
	private String qq = "";// qq
	private String email = "";// 邮箱
	private String address;// 联系详细地址

	// 控制
	@Commnent("用户组Id")
	private int groupId = 0;// 用户组Id
	@Commnent("角色")
	@Column(name = "group_name", length = 11)
	private String groupName = "";// 用户组名称
	@Commnent("用户锁")
	@Column(name = "locked", length = 1)
	private int locked = 0;// 默认为不锁住
	@Commnent("用户状态")
	@Column(name = "status", length = 1)
	private int status = 0;// 0-正常用户，1-屏蔽用户

	// 操作信息
	@Commnent("编辑人ID")
	@Column(name = "editor_id", length = 11)
	private int editorId = 0;// 编辑人Id
	@Commnent("编辑人")
	@Column(name = "editor_name", length = 32)
	private String editorName = "";// 编辑人
	@Commnent("编辑时间")
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "edit_time")
	private Date editTime;// 编辑时间
	@Commnent("创建人ID")
	@Column(name = "creater_id", length = 11)
	private int createrId = 0;// 编辑人Id
	@Commnent("创建人")
	@Column(name = "creater", length = 32)
	private String creater = "";// 编辑人
	@Commnent("创建时间")
	@Column(name = "create_time", length = 32)
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;
	@Commnent("删除标识")
	@Column(name = "delete_flag", length = 1)
	private int deleteFlag = 0;// 默认为不删除，1为删除

	@Commnent("登录次数")
	@Column(name = "login_count", length = 11)
	private int loginCount = 0;

	@Commnent("最后的登录时间")
	@Column(name = "last_login_date", length = 32)
	@Temporal(TemporalType.TIMESTAMP)
	private Date lastLoginDate;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public int getSex() {
		return sex;
	}

	public void setSex(int sex) {
		this.sex = sex;
	}

	@JsonFormat(pattern = "yyyy-MM-dd")
	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getHeadPic() {
		return headPic;
	}

	public void setHeadPic(String headPic) {
		this.headPic = headPic;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public int getGroupId() {
		return groupId;
	}

	public void setGroupId(int groupId) {
		this.groupId = groupId;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public int getLocked() {
		return locked;
	}

	public void setLocked(int locked) {
		this.locked = locked;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getEditorId() {
		return editorId;
	}

	public void setEditorId(int editorId) {
		this.editorId = editorId;
	}

	public String getEditorName() {
		return editorName;
	}

	public void setEditorName(String editorName) {
		this.editorName = editorName;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEditTime() {
		return editTime;
	}

	public void setEditTime(Date editTime) {
		this.editTime = editTime;
	}

	public int getCreaterId() {
		return createrId;
	}

	public void setCreaterId(int createrId) {
		this.createrId = createrId;
	}

	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public int getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	public int getLoginCount() {
		return loginCount;
	}

	public void setLoginCount(int loginCount) {
		this.loginCount = loginCount;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getLastLoginDate() {
		return lastLoginDate;
	}

	public void setLastLoginDate(Date lastLoginDate) {
		this.lastLoginDate = lastLoginDate;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getHomeTel() {
		return homeTel;
	}

	public void setHomeTel(String homeTel) {
		this.homeTel = homeTel;
	}

	public String getWorkTel() {
		return workTel;
	}

	public void setWorkTel(String workTel) {
		this.workTel = workTel;
	}

	public String getMobileTel() {
		return mobileTel;
	}

	public void setMobileTel(String mobileTel) {
		this.mobileTel = mobileTel;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getCardType() {
		return cardType;
	}

	public void setCardType(String cardType) {
		this.cardType = cardType;
	}


	public String getPositionName() {
		return positionName;
	}

	public void setPositionName(String positionName) {
		this.positionName = positionName;
	}

	public String getCompanyUUID() {
		return companyUUID;
	}

	public void setCompanyUUID(String companyUUID) {
		this.companyUUID = companyUUID;
	}

	public String getDeptUUID() {
		return deptUUID;
	}

	public void setDeptUUID(String deptUUID) {
		this.deptUUID = deptUUID;
	}

	public String getPositionUUID() {
		return positionUUID;
	}

	public void setPositionUUID(String positionUUID) {
		this.positionUUID = positionUUID;
	}

	@Override
	public String toString() {
		return "AdminUser [id=" + id + ", uuid=" + uuid + ", userName=" + userName + ", password=" + password
				+ ", realName=" + realName + ", cardType=" + cardType + ", cardNo=" + cardNo + ", sex=" + sex
				+ ", birthday=" + birthday + ", headPic=" + headPic + ", remark=" + remark + ", companyUUID="
				+ companyUUID + ", companyName=" + companyName + ", deptUUID=" + deptUUID + ", deptName=" + deptName
				+ ", positionUUID=" + positionUUID + ", positionName=" + positionName + ", homeTel=" + homeTel
				+ ", workTel=" + workTel + ", mobileTel=" + mobileTel + ", qq=" + qq + ", email=" + email + ", address="
				+ address + ", groupId=" + groupId + ", groupName=" + groupName + ", locked=" + locked + ", status="
				+ status + ", editorId=" + editorId + ", editorName=" + editorName + ", editTime=" + editTime
				+ ", createrId=" + createrId + ", creater=" + creater + ", createTime=" + createTime + ", deleteFlag="
				+ deleteFlag + ", loginCount=" + loginCount + ", lastLoginDate=" + lastLoginDate + "]";
	}
}
